package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream ins = new FileInputStream("C:\\Users\\DELL\\Desktop\\10001.jpg");
        FileOutputStream ons = new FileOutputStream("C:\\Users\\DELL\\Desktop\\10002.jpg");
        int d;
        while ((d = ins.read())!=-1){
            ons.write(d);
        }
        System.out.println("复制完毕");
        ins.close();
        ons.close();
    }
}
